Security Testing (ST):
  It is the process that determines that the confidential data stays confidential & user can perform only those tasks which they are authorized to perform is k.a., ST.

Key terms used in ST:
1. Vulnerability
2. URL manipulation
3. SQL injection
4. Cross Site Scripting (XSS)
5. Spoofing


1. Vulnerability: It is the weakness in the s/w. it can be due to presence of virus, SQL injection, presence of defects in the s/w.
------------------------------------------------

2. URL manipulation: Some web applications interacts with the servers with the help of information stores in the client URL. The URL may contains few data in the form of end point/query strings/path parameter.

   Hackers take the URL modify the query String/parameter, send the request back to server in order to get additional information from the server.

By manipulating certain parts of a URL, a hacker can get a web server to deliver web pages that they are not supposed to have access to.

On dynamic websites, parameters are mostly passed via the URL as follows: 

http://target/forum/?cat=2

The data present in the URL is automatically created by the site. When navigating normally, a user simply clicks the links proposed by the website. If a user manually modifies the parameter, they can try different values, for example:

http://target/forum/?cat=6
-------------------------------------------------
3. SQL injection: Inserting SQL statement through GUI into some query which is then executed by the server is k.a., SQL injection
-------------------------------------------------
4. Cross Site Scripting: In some intra connected network the hackers can steal the data from the adjacent computers by writing programms in their local machines is k.a., Cross Site Scripting.
-------------------------------------------------
5. Spoofing: creation of hoax-alike (looks like) website/emails is k.a., spoofing.

--------------------------------------


How to prevent:

1. Password cracking mechanism:
   The password should be a combination of 
   1. atleast 1 Upper case letter
   2. atleast 1 lower case letter
   3. atleast 1 number
   4. atleast 1 special character
   5. atleast 8-15 digits

   The password should be expire in every configured period of time.
 Ex: 45 days

   The last 4 used passwords should not be set as new password

2. How to prevent URL manipulations: 
   (a) Hide the address bar
   (b) make the address bar read-only
   (c) any redirections should be rejected by the server.

3. How to prevent SQL injection:
   (a) apply length restriction to the GUI components
   (b) The GUI should not accept special characters viz., *, ',"",, etc
   
4. How to prevent Cross Site scripting: 
    By blocking <html> & <script> tag in the webpages we can avoid XSS.

5. Spoofing : use common sence


Tools to perform ST: 
Web inspector (hp)
Parrot
Checkmarx
ZapProxy